package com.ai.bitcoin.jpa.dao;

import com.ai.bitcoin.jpa.entity.BitcoinWeixinMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface BitcoinWeixinMenuDao extends JpaRepository<BitcoinWeixinMenu, String> {

    @Query(value = "select * from bitcoin_weixin_menu where parent_id is NULL  and  status = 1", nativeQuery = true)
    List<BitcoinWeixinMenu> queryFirstButton();

    List<BitcoinWeixinMenu> findAllByParentIdAndStatus(String parentId,Integer status);

}
